# RUN: llc %s -mtriple=m68k -start-after=prologepilog -O0 -filetype=obj -o - \
# RUN:   | extract-section .text \
# RUN:   | FileCheck %s -check-prefixes=MOVM32PM,MOVM32JM

#------------------------------------------------------------------------------
# MxMOVEM_MR is used to store a list of register sequentially into a memory
# location
#------------------------------------------------------------------------------

--- # ARID
#               -------------------+---+-----------+---+-----------+-----------
#                F   E   D   C   B | A | 9   8   7 | 6 | 5   4   3 | 2   1   0
#               -------------------+---+-----------+---+-----------+-----------
#                0   1   0   0   1 | D | 0   0   1 | S |    MODE   |    REG
#               -------------------+---+-----------+---+-----------+-----------
#                                      REGISTER LIST MASK
#               ---------------------------------------------------------------
# MOVM32PM:      0   1   0   0   1   0   0   0 . 1   1   1   0   1   0   0   1
# MOVM32PM-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   1
# MOVM32PM-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   0
#               ---------------------------------------------------------------
# MOVM32PM-SAME: 0   1   0   0   1   0   0   0 . 1   1   1   0   1   0   0   1
# MOVM32PM-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   1   1
# MOVM32PM-SAME: 1   1   1   1   1   1   1   1 . 1   1   1   1   1   1   1   1
name: MxMOVEM_MR_ARID
body: |
  bb.0:
    MOVM32pm  0, $a1, 1
    MOVM32pm -1, $a1, 3

...
--- # ARI
#               -------------------+---+-----------+---+-----------+-----------
#                F   E   D   C   B | A | 9   8   7 | 6 | 5   4   3 | 2   1   0
#               -------------------+---+-----------+---+-----------+-----------
#                0   1   0   0   1 | D | 0   0   1 | S |    MODE   |    REG
#               -------------------+---+-----------+---+-----------+-----------
# MOVM32JM-SAME: 0   1   0   0   1   0   0   0 . 1   1   0   1   0   0   0   1
# MOVM32JM-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   0   1
#               ---------------------------------------------------------------
# MOVM32JM-SAME: 0   1   0   0   1   0   0   0 . 1   1   0   1   0   0   0   1
# MOVM32JM-SAME: 0   0   0   0   0   0   0   0 . 0   0   0   0   0   0   1   1
#               ---------------------------------------------------------------
#                                      REGISTER LIST MASK
#               ---------------------------------------------------------------
name: MxMOVEM_MR_ARI
body: |
  bb.0:
    MOVM32jm $a1, 1
    MOVM32jm $a1, 3

...
